GATE IT 2004
Q31.
In a class of 200 students, 125 students have taken Programming Language course, 85 students have taken Data Structures course, 65 students have taken Computer Organization course; 50 students have taken both Programming Language and Data Structures, 35 students have taken both Programming Language and Computer Organization; 30 students have taken both Data Structures and Computer Organization, 15 students have taken all the three courses. How many students have not taken any of the three courses?Q32.
A table T1 in a relational database has the following rows and columns: \begin{array}{|c|c|c|} \hline \text {Roll no. } & \text {Marks} \\\hline 1& 10 \\\hline 2 & 20 \\\hline3 & 30 \\\hline 4 & \text{NULL}\\\hline \end{array} The following sequence of SQL statements was successfully executed on table T1. Update T1 set marks = marks + 5 Select avg(marks) from T1 What is the output of the select statement?Q33.
Consider two tables in a relational database with columns and rows as follows: \overset{\text{Table: Student}}{\begin{array}{|c|c|c|} \hline \textbf {Roll\_no} & \textbf{Name} & \textbf{Dept\_id} \\\hline 1& \text{ABC} & 1\\\hline 2& \text{DEF} & 1 \\\hline 3 & \text{GHI} & 2\\\hline 4 & \text{JKL} & 3\\\hline \end{array}} \qquad \overset{\text{Table: Department}}{\begin{array}{|c|c|c|} \hline \textbf {Dept\_id} & \textbf{Dept\_name} \\\hline 1& \text{A} \\\hline 2& \text{B} \\\hline 3 & \text{C} \\\hline \end{array}} Roll_no is the primary key of the Student table, Dept_id is the primary key of the Department table and Student.Dept_id is a foreign key from Department.Dept_id What will happen if we try to execute the following two SQL statements? update Student set Dept_id = Null where Roll_on = 1 update Department set Dept_id = Null where Dept_id = 1Q34.
A program attempts to generate as many permutations as possible of the string, 'abcd' by pushing the characters a,b,c,d in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings CANNOT be generated using this program?Q35.
A process executes the following segment of code : for(i = 1; i <= n; i++) fork (); The number of new processes created isQ36.
Which of the following commands or sequences of commands will rename a file x to file y in a Unix system ? I. mv y, x II. mv x, y III. cp y, x (rm x) IV. cp x, y (rm x)Q38.
Consider the following schedule S of transactions T1 and T2:{\begin{array}{l|l} \textbf{T1}& \textbf{T2} \\\hline \text{Read(A)} \\ \text{A = A ? 10}\\ & \text{Read(A) }\\ & \text{Temp = 0.2*A} \\ & \text{Write(A)} \\ & \text{Read(B)} \\ \text{Write(A)}\\ \text{Read(B)}\\ \text{B = B + 10}\\ \text{Write(B)} \\ & \text{B = B + Temp} \\ & \text{Write(B)}\\ \end{array}}Which of the following is TRUE about the schedule S ?Q39.
A TCP message consisting of 2100 bytes is passed to IP for delivery across two networks. The first network can carry a maximum payload of 1200 bytes per frame and the second network can carry a maximum payload of 400 bytes per frame, excluding network overhead. Assume that IP overhead per packet is 20 bytes. What is the total IP overhead in the second network for this transmission?